﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<ChoViet.Model.Event>" %>
<%@ Import Namespace="ChoViet.Lib.Helpers" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Sửa chủ đề - sự kiện
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

  <%if (ViewData["MessageInfo"] == null)
      { %>
    <% using (Html.BeginForm("EditCms", "Event", FormMethod.Post, new { id = "adminForm"}))
       {%>
    <%= Html.ValidationSummary(true)%>
    <table class="admintable" width="100%">
        <tbody>
            <tr>
                <td class="key">
                     Tên chủ đề - sự kiện(<font color="red">*</font>):
                </td>
                <td>
                    <%=Html.TextBoxFor(m=>m.Title, new { @class="required",style="width:450px" })%>
                </td>
            </tr>
            <tr>
                <td class="key">
                     Độ ưu tiên:
                </td>
                <td>
                    <%=Html.TextBoxFor(m=>m.Priority, new { style="width:30px" })%>
                </td>
            </tr>
            <tr>
                <td class="key">
                     Trạng thái hiển thị:
                </td>
                <td>
                    <%= Html.RadioButtonFor(m=>m.PubYN, true)%>
                    Publish
                    <%= Html.RadioButtonFor(m=> m.PubYN, false) %>
                    Không Publish
                </td>
            </tr>
            <tr>
                <td class="key">
                     Mô tả:
                </td>
                <td>
                    <%=Html.TextAreaFor(m=>m.Description, new {style="width:250px" })%>
                </td>
            </tr>
            <tr>
                <td class="key">
                     MetaKeyword:
                </td>
                <td>
                    <%= Html.TextBoxFor(m => m.MetaKeyword, new { style = "width:250px" })%>
                </td>
            </tr>
            <tr>
                <td class="key">
                     MetaDescription:
                </td>
                <td>
                    <%= Html.TextAreaFor(m => m.MetaDescription, new { style = "width:250px" })%>
                </td>
            </tr>
            <tr>
                <td colspan="2" align="center">
                    <input type="submit" id="btnSave" value="Lưu thay đổi" name ="btnSave" />
                </td>
            </tr>            
        </tbody>
    </table>
    <%}
  } %>
  <script type ="text/javascript">
  	$(document).ready(function() {
  		$("#adminForm").validate({
  			rules: {
  			"Name": "required"
  			},
  			messages: {
  			"Name": "Thông tin bắt buộc phải nhập"
  			}
  		});
  	});
  </script>

</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="Toolbar" runat="server">
 <td>
        <%= Html.Toolbar("Quay về", "/Tag/IndexCms", "back") %>
    </td>
</asp:Content>

<asp:Content ID="Content4" ContentPlaceHolderID="Header" runat="server">
Sửa tag
</asp:Content>

<asp:Content ID="Content5" ContentPlaceHolderID="Message" runat="server">
 <%=ViewData["MessageInfo"]!=null? "<p class='perror'>"+Html.Encode(ViewData["MessageInfo"])+"</p>":string.Empty%>
</asp:Content>
